package com.jrx.anytxn.reporting.job.unionFile.step;

import com.jrx.anytxn.customer.entity.CmCustomerLimitInfo;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CreditInfoFileReader extends MyBatisPagingItemReader<CmCustomerLimitInfo> {

    public CreditInfoFileReader(SqlSessionFactory sqlSessionFactory, Integer pagesize, String updateTime, List<String> limitIdList){
        setSaveState(false);
        setPageSize(pagesize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.customer.mapper.ext.ExtCmCustomerLimitInfoMapper.selectAllByUpdateTimeAndLimitIds");
        Map<String, Object> map = new HashMap<>();
        map.put("updateTime",updateTime);
        map.put("limitIdList",limitIdList);
        setParameterValues(map);
    }
}
